package cn.langpy.recall.common;

public class ChatRecord {
    private String userId = "";
    private String sessionId = "";
    private MessageRole role;
    private String message;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public MessageRole getRole() {
        return role;
    }

    public void setRole(MessageRole role) {
        this.role = role;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static ChatRecordBuilder builder() {
        return new ChatRecordBuilder();
    }

    public static class ChatRecordBuilder {
        private ChatRecord chatRecord;

        public ChatRecordBuilder() {
            chatRecord = new ChatRecord();
        }
        public ChatRecord build() {
            return chatRecord;
        }
        public ChatRecordBuilder userId(String userId) {
            this.chatRecord.setUserId(userId);
            return this;
        }
        public ChatRecordBuilder sessionId(String sessionId) {
            this.chatRecord.setSessionId(sessionId);
            return this;
        }
        public ChatRecordBuilder role(MessageRole role) {
            this.chatRecord.setRole(role);
            return this;
        }
        public ChatRecordBuilder message(String message) {
            this.chatRecord.setMessage(message);
            return this;
        }
    }

}
